package com.cjxt.ams.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cjxt.ams.domain.Menu;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author zhanghuan
 * @version V1.0
 * @Description: 菜单   持久层
 * @className: MenuDao
 * @date 2021/11/22 10:18
 * @company:华勤技术股份有限公司
 * @copyright: Copyright (c) 2021
 */
@Mapper
public interface MenuDao extends BaseMapper<Menu> {

    /**
     * @description: 根据父菜单ID，查询子菜单
     * @author zhanghuan
     * @date: 2021/11/22 10:28
     * @Param: menuPid 父菜单ID
     * @return: java.util.List<com.cjxt.ams.domain.Menu>
     */
    List<Menu> queryListMenuPid(Integer menuPid);

    /**
     * @description: 新增/修改 菜单树形结构
     * @author zhanghuan
     * @date 2021/12/10 15:33
     * @param
     * @return: java.util.List<com.cjxt.ams.domain.Menu>
     */
    List<Menu> queryTreeData();

    /**
     * @description: 根据用户ID用户的导航菜单
     * @author zhanghuan
     * @date 2021/12/24 15:46
     * @param id  用户id
     * @return: com.cjxt.ams.domain.Menu
     */
    Menu queryTreeDataUser(Integer id);

    List<Menu> getMenusByRoleId(Integer RoleId);

}